11. Pick the JavaScript Approach

Pick the JavaScript Approach

Question:

Start Quiz:

Solution:

INSTRUCTOR NOTE:

This one can be tricky, take your time! See below for examples of blocking, inline and async scripts.


  • Blocking: <script src="anExteralScript.js"></script>
  • Inline: <script>document.write("this is an inline script")</script>
  • Async: <script async src="anExternalScript.js"></script>

    Follow your instructors!

    +Ilya Grigorik, @igrigorik

    @cwpittman

    See below for some examples of blocking, inline and async scripts.


    • Blocking: <script src="anExteralScript.js"></script>
    • Inline: <script>document.write("this is an inline script")</script>
    • Async: <script async src="anExternalScript.js"></script>